package com.freeman.cement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.freeman.cement.entity.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
@Repository //标识为持久层组件 deptDao 不爆红
public interface DeptDao extends BaseMapper<Dept> {
    List<Dept> selectAllDept();
    List<Dept> selectAllDutyroom();
    List<Dept> selectDeptBydept_name(Dept dept);
    List<Dept> selectDeptBydept_code(Dept dept);
    Dept findDept(@RequestParam String dept_code);
    Dept selectDeptByid(int deptId);
    Dept selectDutyRoomByid(@Param("userId") int userId);
    void addDept(Dept dept);
    void deleteDept(Dept dept);
    void updateDept(Dept dept);
}
